/**
 * 
 */

package com.pp.admin.common.client.helper;

import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;

/**
 * @author pandurang
 */
public class AdminAnchor extends Composite {
	
	private Anchor	link	= new Anchor();
	
	private String	value	= null;
	
	public AdminAnchor( String resourceURL ) {

		this( null, resourceURL );
	}
	
	public AdminAnchor( String val, String resourceURL ) {

		this.value = val;
		String resource = "<img src='" + resourceURL + "'/>";
		link.setHref( "#" );
		link.setHTML( resource );
		initWidget( link );
	}
	
	/**
	 * @return the value
	 */
	public String getValue() {

		return value;
	}
	
	/**
	 * @param value
	 *            the value to set
	 */
	public void setValue( String value ) {

		this.value = value;
	}
	
	public void addClickHandler( ClickHandler handler ) {

		link.addClickHandler( handler );
	}
	
}
